package com.diankangwo.factory.service.impl;

import com.diankangwo.factory.dao.TdCityMapper;
import com.diankangwo.factory.entity.TdCity;
import com.diankangwo.factory.service.TdCityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/** 城市接口实现类
 * Created by wuye on 2017/9/15.
 */
@Service("TdCityService")
public class TdCityServiceImpl implements TdCityService{

    @Autowired
    private TdCityMapper mapper;

    /**
     * 根据省份ID获取城市列表
     * @param provinceid
     * @return
     */
    @Override
    public List<TdCity> queryByProvinceId(int provinceid) {
        return mapper.queryByProvinceId(provinceid);
    }

    @Override
    public int deleteByPrimaryKey(Integer cityid) {
        return mapper.deleteByPrimaryKey(cityid);
    }

    @Override
    public int insert(TdCity record) {
        return mapper.insert(record);
    }

    @Override
    public int insertSelective(TdCity record) {
        return mapper.insertSelective(record);
    }

    @Override
    public TdCity selectByPrimaryKey(Integer cityid) {
        return mapper.selectByPrimaryKey(cityid);
    }

    @Override
    public int updateByPrimaryKeySelective(TdCity record) {
        return mapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(TdCity record) {
        return mapper.updateByPrimaryKey(record);
    }
}
